
<!DOCTYPE html>
<!-- saved from url=(0028)http://dingdong.io/test.html -->
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    
    <meta name="viewport" content="width=device-width initial-scale=1.0 maximum-scale=1.0 user-scalable=yes">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-touch-fullscreen" content="yes">
    <meta name="format-detection" content="telephone=no">
    <title>.</title>
</head>

<body class="outerwrap">
    <h1>活动链接：</h1>
    <textarea id="hdUrl" style="width: 500px;height:200px">

    </textarea><br>

    <button onclick="createLink()">生成APP链接</button>  <a id="cs2"  href="">点我唤起APP</a>
    <h1>结果：</h1>
    <textarea id="appUrlText" style="width: 500px;height:200px">

    </textarea><br>
</body>

</html>
  

 <script>

        function createLink() {
            var url=document.getElementById("hdUrl").value;
            var appUrl = 'xyzqulb://xyzq.com.cn/jumpActivity?params={"link" :"' + encodeURIComponent(url) + '","linkType":"2"}'
            document.getElementById("cs2").setAttribute('href', appUrl)
            document.getElementById("appUrlText").value=appUrl;
        }
 </script>